<?php

namespace api\user\controller;

class AdminGroupController extends \Aaa\user\controller\AdminGroupController {

    protected function init() {
        $this->baseField = [
            [
                'field' => 'id',
                'name' => 'ID',
            ],
            [
                'field' => 'list_order',
                'name' => '排序',
            ],
            [
                'field' => 'name',
                'name' => '级别名称',
            ],
            [
                'field' => 'label',
                'name' => '标签名称',
            ],
            [
                'field' => 'label_color',
                'name' => '标签颜色',
                'type' => 'color',
            ],
            [
                'field' => 'label_background_color',
                'name' => '标签背景色',
                'type' => 'color',
            ],
            [
                'field' => 'expiration',
                'name' => '有效期',
            ],
        ];
    }

    protected function beforeIndex() {
        $this->actionField = ['id', 'list_order', 'name', 'label', 'label_color', 'label_background_color', 'expiration',];
    }

    protected function beforeAdd() {
        $this->actionField = ['name', 'label', 'label_color', 'label_background_color', 'expiration', 'list_order',];
    }

    protected function beforeEdit() {
        $this->beforeAdd();
    }


}